package com.adf.admin.controller;

import org.springframework.web.bind.annotation.RequestMapping;
<% if(restControllerStyle){ %>
import org.springframework.web.bind.annotation.RestController;
<% }else{ %>
import org.springframework.stereotype.Controller;
<% } %>
<% if(isNotEmpty(superControllerClassPackage)){ %>

<% } %>

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author adf
 * @since 2025-10-27
 */
<% if(restControllerStyle){ %>
@RestController
<% }else{ %>
@Controller
<% } %>
@RequestMapping("<% if(isNotEmpty(package.ModuleName)){ %>/admin<% } %>/<% if(controllerMappingHyphenStyle){ %>user<% }else{ %>user<% } %>")
<% if(kotlin){ %>
class UserController<% if(isNotEmpty(superControllerClass)){ %> : FreeMarker template error (DEBUG mode; use RETHROW in production!):
The following has evaluated to null or missing:
==> superControllerClass  [in template "templates/controller.java.ftl" at line 28, column 78]

----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
	- Failed at: ${superControllerClass}  [in template "templates/controller.java.ftl" at line 28, column 76]
----

Java stack trace (for programmers):
----
freemarker.core.InvalidReferenceException: [... Exception message was already printed; see it above ...]
	at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:134)
	at freemarker.core.EvalUtil.coerceModelToTextualCommon(EvalUtil.java:481)
	at freemarker.core.EvalUtil.coerceModelToStringOrMarkup(EvalUtil.java:401)
	at freemarker.core.EvalUtil.coerceModelToStringOrMarkup(EvalUtil.java:370)
	at freemarker.core.DollarVariable.calculateInterpolatedStringOrMarkup(DollarVariable.java:104)
	at freemarker.core.DollarVariable.accept(DollarVariable.java:63)
	at freemarker.core.Environment.visit(Environment.java:335)
	at freemarker.core.Environment.visit(Environment.java:341)
	at freemarker.core.Environment.process(Environment.java:314)
	at freemarker.template.Template.process(Template.java:383)
	at com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine.writer(FreemarkerTemplateEngine.java:60)
	at com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine.outputFile(AbstractTemplateEngine.java:190)
	at com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine.outputController(AbstractTemplateEngine.java:167)
	at com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine.lambda$batchOutput$2(AbstractTemplateEngine.java:250)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	at com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine.batchOutput(AbstractTemplateEngine.java:235)
	at com.baomidou.mybatisplus.generator.AutoGenerator.execute(AutoGenerator.java:185)
	at com.baomidou.mybatisplus.generator.FastAutoGenerator.execute(FastAutoGenerator.java:239)
	at com.adf.admin.CodeGenerator.main(CodeGenerator.java:53)
